home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / configure < prev    next >
Encoding:
Text File  |  1995-03-15  |  53.2 KB  |  2,042 lines  |  [TEXT/ttxt]

  1.  
  2. #!/bin/sh
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 1.11 
  5. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  6.  
  7. # This configure script is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU General Public License as published
  9. # by the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11.  
  12. # This script is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  15. # Public License for more details.
  16.  
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. # Save the original args to write them into config.status later.
  22. configure_args="$*"
  23.  
  24. # Only options that might do something get documented.
  25. ac_usage="Usage: configure [options] [host]
  26. Options: [defaults in brackets after descriptions]
  27. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  28. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  29. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  30. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  31. --help            print this message
  32. --host=HOST        configure for HOST [guessed]
  33. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  34. --quiet, --silent    do not print \`checking for...' messages
  35. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  36. --target=TARGET        configure for TARGET [TARGET=HOST]
  37. --verbose        print results of checks
  38. --version        print the version of autoconf that created configure
  39. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  40. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  41. --x-includes=DIR    X include files are in DIR
  42. --x-libraries=DIR    X library files are in DIR"
  43.  
  44. # Initialize some variables set by options.
  45. # The variables have the same names as the options, with
  46. # dashes changed to underlines.
  47. build=NONE
  48. exec_prefix=
  49. host=NONE
  50. no_create=
  51. nonopt=NONE
  52. norecursion=
  53. prefix=
  54. program_prefix=
  55. program_suffix=
  56. program_transform_name=
  57. silent=
  58. srcdir=
  59. target=NONE
  60. verbose=
  61. x_includes=
  62. x_libraries=
  63.  
  64. ac_prev=
  65. for ac_option
  66. do
  67.  
  68.   # If the previous option needs an argument, assign it.
  69.   if test -n "$ac_prev"; then
  70.     eval "$ac_prev=\$ac_option"
  71.     ac_prev=
  72.     continue
  73.   fi
  74.  
  75.   # Accept (but ignore some of) the important Cygnus configure
  76.   # options, so we can diagnose typos.
  77.  
  78.   case "$ac_option" in
  79.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  80.   *) ac_optarg= ;;
  81.   esac
  82.  
  83.   case "$ac_option" in
  84.  
  85.   -build | --build | --buil | --bui | --bu | --b)
  86.     ac_prev=build ;;
  87.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  88.     build="$ac_optarg" ;;
  89.  
  90.   -disable-* | --disable-*)
  91.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  92.     # Reject names that aren't valid shell variable names.
  93.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  94.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  95.     fi
  96.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  97.     eval "enable_${ac_feature}=no" ;;
  98.  
  99.   -enable-* | --enable-*)
  100.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  101.     # Reject names that aren't valid shell variable names.
  102.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  103.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  104.     fi
  105.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  106.     case "$ac_option" in
  107.       *=*) ;;
  108.       *) ac_optarg=yes ;;
  109.     esac
  110.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  111.  
  112.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  113.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  114.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  115.   | --exec | --exe | --ex)
  116.     ac_prev=exec_prefix ;;
  117.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  118.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  119.   | --exec=* | --exe=* | --ex=*)
  120.     exec_prefix="$ac_optarg" ;;
  121.  
  122.   -gas | --gas | --ga | --g)
  123.     with_gas=yes ;; # Obsolete; use --with-gas.
  124.  
  125.   -help | --help | --hel | --he)
  126.     cat << EOF
  127. $ac_usage
  128. EOF
  129.     exit 0 ;;
  130.  
  131.   -host | --host | --hos | --ho)
  132.     ac_prev=host ;;
  133.   -host=* | --host=* | --hos=* | --ho=*)
  134.     host="$ac_optarg" ;;
  135.  
  136.   -nfp | --nfp | --nf)
  137.     with_fp=no ;; # Obsolete; use --without-fp.
  138.  
  139.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  140.   | --no-cr | --no-c)
  141.     no_create=yes ;;
  142.  
  143.   -norecursion | --norecursion | --norecursio | --norecursi \
  144.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  145.     norecursion=yes ;;
  146.  
  147.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  148.     ac_prev=prefix ;;
  149.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  150.     prefix="$ac_optarg" ;;
  151.  
  152.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  153.   | --program-pre | --program-pr | --program-p)
  154.     ac_prev=program_prefix ;;
  155.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  156.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  157.     program_prefix="$ac_optarg" ;;
  158.  
  159.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  160.   | --program-suf | --program-su | --program-s)
  161.     ac_prev=program_suffix ;;
  162.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  163.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  164.     program_suffix="$ac_optarg" ;;
  165.  
  166.   -program-transform-name | --program-transform-name \
  167.   | --program-transform-nam | --program-transform-na \
  168.   | --program-transform-n | --program-transform- \
  169.   | --program-transform | --program-transfor \
  170.   | --program-transfo | --program-transf \
  171.   | --program-trans | --program-tran \
  172.   | --progr-tra | --program-tr | --program-t)
  173.     ac_prev=program_transform_name ;;
  174.   -program-transform-name=* | --program-transform-name=* \
  175.   | --program-transform-nam=* | --program-transform-na=* \
  176.   | --program-transform-n=* | --program-transform-=* \
  177.   | --program-transform=* | --program-transfor=* \
  178.   | --program-transfo=* | --program-transf=* \
  179.   | --program-trans=* | --program-tran=* \
  180.   | --progr-tra=* | --program-tr=* | --program-t=*)
  181.     program_transform_name="$ac_optarg" ;;
  182.  
  183.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  184.   | -silent | --silent | --silen | --sile | --sil)
  185.     silent=yes ;;
  186.  
  187.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  188.     ac_prev=srcdir ;;
  189.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  190.     srcdir="$ac_optarg" ;;
  191.  
  192.   -target | --target | --targe | --targ | --tar | --ta | --t)
  193.     ac_prev=target ;;
  194.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  195.     target="$ac_optarg" ;;
  196.  
  197.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  198.     verbose=yes ;;
  199.  
  200.   -version | --version | --versio | --versi | --vers)
  201.     echo "configure generated by autoconf version 1.11"
  202.     exit 0 ;;
  203.  
  204.   -with-* | --with-*)
  205.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  206.     # Reject names that aren't valid shell variable names.
  207.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  208.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  209.     fi
  210.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  211.     case "$ac_option" in
  212.       *=*) ;;
  213.       *) ac_optarg=yes ;;
  214.     esac
  215.     eval "with_${ac_package}='$ac_optarg'" ;;
  216.  
  217.   -without-* | --without-*)
  218.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  219.     # Reject names that aren't valid shell variable names.
  220.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  221.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  222.     fi
  223.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  224.     eval "with_${ac_package}=no" ;;
  225.  
  226.   --x) with_x=yes ;; # Obsolete; use --with-x.
  227.  
  228.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  229.   | --x-incl | --x-inc | --x-in | --x-i)
  230.     ac_prev=x_includes ;;
  231.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  232.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  233.     x_includes="$ac_optarg" ;;
  234.  
  235.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  236.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  237.     ac_prev=x_libraries ;;
  238.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  239.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  240.     x_libraries="$ac_optarg" ;;
  241.  
  242.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  243.     ;;
  244.  
  245.   *) 
  246.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  247.       echo "configure: warning: $ac_option: invalid host type" >&2
  248.     fi
  249.     if test "x$nonopt" != xNONE; then
  250.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  251.     fi
  252.     nonopt="$ac_option"
  253.     ;;
  254.  
  255.   esac
  256. done
  257.  
  258. if test -n "$ac_prev"; then
  259.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  260. fi
  261.  
  262. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  263. trap 'rm -fr confdefs* $ac_clean_files' 0
  264.  
  265. # Save the original args if we used an alternate arg parser.
  266. ac_configure_temp="${configure_args-$*}"
  267. # Strip out --no-create and --norecursion so they don't pile up.
  268. configure_args=
  269. for ac_arg in $ac_configure_temp; do
  270.   case "$ac_arg" in
  271.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  272.   | --no-cr | --no-c) ;;
  273.   -norecursion | --norecursion | --norecursio | --norecursi \
  274.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  275.   *) configure_args="$configure_args $ac_arg" ;;
  276.   esac
  277. done
  278.  
  279. # NLS nuisances.
  280. # These must not be set unconditionally because not all systems understand
  281. # e.g. LANG=C (notably SCO).
  282. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  283. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  284.  
  285. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  286. rm -rf conftest* confdefs.h
  287. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  288. echo > confdefs.h
  289.  
  290. # A filename unique to this package, relative to the directory that
  291. # configure is in, which we can look for to find out if srcdir is correct.
  292. ac_unique_file=interp/mindy.h
  293.  
  294. # Find the source files, if location was not specified.
  295. if test -z "$srcdir"; then
  296.   ac_srcdir_defaulted=yes
  297.   # Try the directory containing this script, then `..'.
  298.   ac_prog=$0
  299.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  300.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  301.   srcdir=$ac_confdir
  302.   if test ! -r $srcdir/$ac_unique_file; then
  303.     srcdir=..
  304.   fi
  305. fi
  306. if test ! -r $srcdir/$ac_unique_file; then
  307.   if test x$ac_srcdir_defaulted = xyes; then
  308.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  309.   else
  310.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  311.   fi
  312. fi
  313. ac_ext=c
  314. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  315. ac_cpp='${CPP}'
  316. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  317.  
  318.  
  319.  
  320. #--------------------------------------------------------------------
  321. #    See if the #!interpreter syntax is supported
  322. #--------------------------------------------------------------------
  323.  
  324. test -n "$silent" || echo "checking whether \`#!' works in shell scripts"
  325. echo '#!/bin/cat
  326. exit 69
  327. ' > conftest
  328. chmod u+x conftest
  329. (SHELL=/bin/sh; export SHELL; ./conftest > /dev/null)
  330. if test $? -ne 69; then
  331.    :; 
  332. else
  333.    :; 
  334. {
  335. test -n "$verbose" && \
  336. echo "    defining NO_SHARP_BANG"
  337. echo "#define" NO_SHARP_BANG "1" >> confdefs.h
  338. DEFS="$DEFS -DNO_SHARP_BANG=1"
  339. }
  340.  
  341. fi
  342. rm -f conftest
  343.  
  344.  
  345. #--------------------------------------------------------------------
  346. #    These macros find a BSD install, a C compiler, and so on, and
  347. #    establish bindings for @INSTALL@, @CC@, and so on.
  348. #--------------------------------------------------------------------
  349.  
  350. # Make sure to not get the incompatible SysV /etc/install and
  351. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  352. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  353. # or the AFS install, which mishandles nonexistent args, or
  354. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  355. # `staff', or /sbin/install on IRIX which has incompatible command-line
  356. # syntax.  Sigh.
  357. #
  358. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  359. #     anyway.
  360. # This turns out not to be true, so the mere pathname isn't an indication
  361. # of whether the program works.  What we really need is a set of tests for
  362. # the install program to see if it actually works in all the required ways.
  363. #
  364. # Avoid using ./install, which might have been erroneously created
  365. # by make from ./install.sh.
  366. if test -z "${INSTALL}"; then
  367.   test -n "$silent" || echo "checking for a BSD compatible install"
  368.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  369.   for ac_dir in $PATH; do
  370.     case "$ac_dir" in
  371.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  372.     *)
  373.       # OSF1 and SCO ODT 3.0 have their own names for install.
  374.       for ac_prog in installbsd scoinst install; do
  375.         if test -f $ac_dir/$ac_prog; then
  376.       if test $ac_prog = install &&
  377.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  378.         # AIX install.  It has an incompatible calling convention.
  379.         # OSF/1 installbsd also uses dspmsg, but is usable.
  380.         :
  381.       else
  382.         INSTALL="$ac_dir/$ac_prog -c"
  383.         break 2
  384.       fi
  385.     fi
  386.       done
  387.       ;;
  388.     esac
  389.   done
  390.   IFS="$ac_save_ifs"
  391. fi
  392.  
  393. if test -z "$INSTALL"; then
  394.   # As a last resort, use the slow shell script.
  395.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  396.     if test -f $ac_dir/install.sh; then
  397.       INSTALL="$ac_dir/install.sh -c"; break
  398.     fi
  399.   done
  400. fi
  401. if test -z "$INSTALL"; then
  402.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  403. fi
  404. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  405.  
  406. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  407. # It thinks the first close brace ends the variable substitution.
  408. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  409. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  410.  
  411. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  412. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  413.  
  414. if test -z "$CC"; then
  415.   # Extract the first word of `gcc', so it can be a program name with args.
  416.   set ac_dummy gcc; ac_word=$2
  417.   test -n "$silent" || echo "checking for $ac_word"
  418.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  419.   for ac_dir in $PATH; do
  420.     test -z "$ac_dir" && ac_dir=.
  421.     if test -f $ac_dir/$ac_word; then
  422.       CC="gcc"
  423.       break
  424.     fi
  425.   done
  426.   IFS="$ac_save_ifs"
  427. fi
  428. test -z "$CC" && CC="cc"
  429. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  430.  
  431. # Find out if we are using GNU C, under whatever name.
  432. cat > conftest.c <<EOF
  433. #ifdef __GNUC__
  434.   yes
  435. #endif
  436. EOF
  437. ${CC-cc} -E conftest.c > conftest.out 2>&1
  438. if egrep yes conftest.out >/dev/null 2>&1; then
  439.   GCC=1 # For later tests.
  440. fi
  441. rm -f conftest*
  442.  
  443. if test -z "$LEX"; then
  444.   # Extract the first word of `flex', so it can be a program name with args.
  445.   set ac_dummy flex; ac_word=$2
  446.   test -n "$silent" || echo "checking for $ac_word"
  447.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  448.   for ac_dir in $PATH; do
  449.     test -z "$ac_dir" && ac_dir=.
  450.     if test -f $ac_dir/$ac_word; then
  451.       LEX="flex"
  452.       break
  453.     fi
  454.   done
  455.   IFS="$ac_save_ifs"
  456. fi
  457. test -z "$LEX" && LEX="lex"
  458. test -n "$LEX" && test -n "$verbose" && echo "    setting LEX to $LEX"
  459.  
  460. if test -z "$LEXLIB"
  461. then
  462.   case "$LEX" in
  463.   flex*) ac_save_LIBS="${LIBS}"
  464. LIBS="${LIBS} -lfl"
  465. ac_have_lib=""
  466. test -n "$silent" || echo "checking for -lfl"
  467. cat > conftest.${ac_ext} <<EOF
  468. #include "confdefs.h"
  469.  
  470. int main() { return 0; }
  471. int t() { main();; return 0; }
  472. EOF
  473. if eval $ac_compile; then
  474.   rm -rf conftest*
  475.   ac_have_lib="1"
  476.  
  477. fi
  478. rm -f conftest*
  479. LIBS="${ac_save_LIBS}"
  480. if test -n "${ac_have_lib}"; then
  481.    :; LEXLIB="-lfl"
  482. else
  483.    :; 
  484. fi
  485.  ;;
  486.   *) LEXLIB="-ll" ;;
  487.   esac
  488. fi
  489. test -n "$verbose" && echo "    setting LEXLIB to $LEXLIB"
  490.  
  491. YACC=${YACC-yacc}
  492. if test -z "$RANLIB"; then
  493.   # Extract the first word of `ranlib', so it can be a program name with args.
  494.   set ac_dummy ranlib; ac_word=$2
  495.   test -n "$silent" || echo "checking for $ac_word"
  496.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  497.   for ac_dir in $PATH; do
  498.     test -z "$ac_dir" && ac_dir=.
  499.     if test -f $ac_dir/$ac_word; then
  500.       RANLIB="ranlib"
  501.       break
  502.     fi
  503.   done
  504.   IFS="$ac_save_ifs"
  505. fi
  506. test -z "$RANLIB" && RANLIB=":"
  507. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  508.  
  509.  
  510. #--------------------------------------------------------------------
  511. #    Establish the default compile options for cc
  512. #--------------------------------------------------------------------
  513.  
  514. if test $CC = gcc
  515. then CCOPTS="-g -O4 -finline-functions -Wall"
  516. else CCOPTS="-g -O"
  517. fi
  518.  
  519. #--------------------------------------------------------------------
  520. #    Establish the default options for lex
  521. #--------------------------------------------------------------------
  522.  
  523. if test $LEX = flex; then
  524.   LFLAGS=${LFLAGS--i}
  525. else
  526.   echo "I could not find flex, so do not try to rebuild comp/lexer.tab.c"
  527.   echo "because lex cannot do it."
  528.   LFLAGS=${LFLAGS-}
  529. fi
  530.  
  531.  
  532. #--------------------------------------------------------------------
  533. #    Find out if sigaction is available.
  534. #--------------------------------------------------------------------
  535.  
  536. test -n "$silent" || echo "checking for sigaction"
  537. cat > conftest.${ac_ext} <<EOF
  538. #include "confdefs.h"
  539. #include <ctype.h>
  540. int main() { return 0; }
  541. int t() { 
  542. /* The GNU C library defines this for functions which it implements
  543.     to always fail with ENOSYS.  Some functions are actually named
  544.     something starting with __ and the normal name is an alias.  */
  545. #if defined (__stub_sigaction) || defined (__stub___sigaction)
  546. choke me
  547. #else
  548. /* Override any gcc2 internal prototype to avoid an error.  */
  549. extern char sigaction(); sigaction();
  550. #endif
  551. ; return 0; }
  552. EOF
  553. if eval $ac_compile; then
  554.   rm -rf conftest*
  555.   sigaction=1
  556.  
  557. else
  558.   rm -rf conftest*
  559.   sigaction=0
  560. fi
  561. rm -f conftest*
  562.  
  563. if test $sigaction = 0; then
  564.   
  565. {
  566. test -n "$verbose" && \
  567. echo "    defining NO_SIGACTION"
  568. echo "#define" NO_SIGACTION "1" >> confdefs.h
  569. DEFS="$DEFS -DNO_SIGACTION=1"
  570. }
  571.  
  572.   LIBOBJS="${LIBOBJS-} sigaction.o"
  573.   test -n "$silent" || echo "checking for sigsetmask"
  574. cat > conftest.${ac_ext} <<EOF
  575. #include "confdefs.h"
  576. #include <ctype.h>
  577. int main() { return 0; }
  578. int t() { 
  579. /* The GNU C library defines this for functions which it implements
  580.     to always fail with ENOSYS.  Some functions are actually named
  581.     something starting with __ and the normal name is an alias.  */
  582. #if defined (__stub_sigsetmask) || defined (__stub___sigsetmask)
  583. choke me
  584. #else
  585. /* Override any gcc2 internal prototype to avoid an error.  */
  586. extern char sigsetmask(); sigsetmask();
  587. #endif
  588. ; return 0; }
  589. EOF
  590. if eval $ac_compile; then
  591.   rm -rf conftest*
  592.   sigsetmask=1
  593.  
  594. else
  595.   rm -rf conftest*
  596.   sigsetmask=0
  597. fi
  598. rm -f conftest*
  599.  
  600.   test -n "$silent" || echo "checking for sigrelse"
  601. cat > conftest.${ac_ext} <<EOF
  602. #include "confdefs.h"
  603. #include <ctype.h>
  604. int main() { return 0; }
  605. int t() { 
  606. /* The GNU C library defines this for functions which it implements
  607.     to always fail with ENOSYS.  Some functions are actually named
  608.     something starting with __ and the normal name is an alias.  */
  609. #if defined (__stub_sigrelse) || defined (__stub___sigrelse)
  610. choke me
  611. #else
  612. /* Override any gcc2 internal prototype to avoid an error.  */
  613. extern char sigrelse(); sigrelse();
  614. #endif
  615. ; return 0; }
  616. EOF
  617. if eval $ac_compile; then
  618.   rm -rf conftest*
  619.   sigrelse=1
  620.  
  621. else
  622.   rm -rf conftest*
  623.   sigrelse=0
  624. fi
  625. rm -f conftest*
  626.  
  627.   if test $sigsetmask = 1; then
  628.     echo "BSD_signals"
  629.     
  630. {
  631. test -n "$verbose" && \
  632. echo "    defining BSD_SIGNALS"
  633. echo "#define" BSD_SIGNALS "1" >> confdefs.h
  634. DEFS="$DEFS -DBSD_SIGNALS=1"
  635. }
  636.  
  637.   elif test $sigrelse = 1; then
  638.     echo "USG_signals"
  639.     
  640. {
  641. test -n "$verbose" && \
  642. echo "    defining USG_SIGNALS"
  643. echo "#define" USG_SIGNALS "1" >> confdefs.h
  644. DEFS="$DEFS -DUSG_SIGNALS=1"
  645. }
  646.  
  647.   else
  648.     echo "I couldn't find posix, bsd, or sysV signal support."
  649.     echo "You may be able to compile compat/sigaction.c by hand."
  650.   fi
  651. fi
  652.  
  653. #--------------------------------------------------------------------
  654. #    This next section is lifted from tcl-7.3, it deals with
  655. #    establishing which of the known faults in POSIX compliance
  656. #    need to be corrected.
  657. #--------------------------------------------------------------------
  658.  
  659. #--------------------------------------------------------------------
  660. #    Supply substitutes for missing POSIX library procedures, or
  661. #    set flags so Tcl uses alternate procedures.
  662. #--------------------------------------------------------------------
  663.  
  664. for ac_func in getcwd opendir strerror strstr
  665. do
  666. test -n "$silent" || echo "checking for ${ac_func}"
  667. cat > conftest.${ac_ext} <<EOF
  668. #include "confdefs.h"
  669. #include <ctype.h>
  670. int main() { return 0; }
  671. int t() { 
  672. /* The GNU C library defines this for functions which it implements
  673.     to always fail with ENOSYS.  Some functions are actually named
  674.     something starting with __ and the normal name is an alias.  */
  675. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  676. choke me
  677. #else
  678. /* Override any gcc2 internal prototype to avoid an error.  */
  679. extern char ${ac_func}(); ${ac_func}();
  680. #endif
  681. ; return 0; }
  682. EOF
  683. if eval $ac_compile; then
  684.   :
  685. else
  686.   rm -rf conftest*
  687.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  688. test -n "$verbose" && echo "    using ${ac_func}.o instead"
  689. fi
  690. rm -f conftest*
  691.  
  692. done
  693.  
  694. for ac_func in strtol memmove tmpnam waitpid
  695. do
  696. test -n "$silent" || echo "checking for ${ac_func}"
  697. cat > conftest.${ac_ext} <<EOF
  698. #include "confdefs.h"
  699. #include <ctype.h>
  700. int main() { return 0; }
  701. int t() { 
  702. /* The GNU C library defines this for functions which it implements
  703.     to always fail with ENOSYS.  Some functions are actually named
  704.     something starting with __ and the normal name is an alias.  */
  705. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  706. choke me
  707. #else
  708. /* Override any gcc2 internal prototype to avoid an error.  */
  709. extern char ${ac_func}(); ${ac_func}();
  710. #endif
  711. ; return 0; }
  712. EOF
  713. if eval $ac_compile; then
  714.   :
  715. else
  716.   rm -rf conftest*
  717.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  718. test -n "$verbose" && echo "    using ${ac_func}.o instead"
  719. fi
  720. rm -f conftest*
  721.  
  722. done
  723.  
  724. test -n "$silent" || echo "checking for gettimeofday"
  725. cat > conftest.${ac_ext} <<EOF
  726. #include "confdefs.h"
  727. #include <ctype.h>
  728. int main() { return 0; }
  729. int t() { 
  730. /* The GNU C library defines this for functions which it implements
  731.     to always fail with ENOSYS.  Some functions are actually named
  732.     something starting with __ and the normal name is an alias.  */
  733. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  734. choke me
  735. #else
  736. /* Override any gcc2 internal prototype to avoid an error.  */
  737. extern char gettimeofday(); gettimeofday();
  738. #endif
  739. ; return 0; }
  740. EOF
  741. if eval $ac_compile; then
  742.   :
  743. else
  744.   rm -rf conftest*
  745.   {
  746. test -n "$verbose" && \
  747. echo "    defining NO_GETTOD"
  748. echo "#define" NO_GETTOD "1" >> confdefs.h
  749. DEFS="$DEFS -DNO_GETTOD=1"
  750. }
  751.  
  752. fi
  753. rm -f conftest*
  754.  
  755. test -n "$silent" || echo "checking for getwd"
  756. cat > conftest.${ac_ext} <<EOF
  757. #include "confdefs.h"
  758. #include <ctype.h>
  759. int main() { return 0; }
  760. int t() { 
  761. /* The GNU C library defines this for functions which it implements
  762.     to always fail with ENOSYS.  Some functions are actually named
  763.     something starting with __ and the normal name is an alias.  */
  764. #if defined (__stub_getwd) || defined (__stub___getwd)
  765. choke me
  766. #else
  767. /* Override any gcc2 internal prototype to avoid an error.  */
  768. extern char getwd(); getwd();
  769. #endif
  770. ; return 0; }
  771. EOF
  772. if eval $ac_compile; then
  773.   :
  774. else
  775.   rm -rf conftest*
  776.   {
  777. test -n "$verbose" && \
  778. echo "    defining NO_GETWD"
  779. echo "#define" NO_GETWD "1" >> confdefs.h
  780. DEFS="$DEFS -DNO_GETWD=1"
  781. }
  782.  
  783. fi
  784. rm -f conftest*
  785.  
  786. test -n "$silent" || echo "checking for wait3"
  787. cat > conftest.${ac_ext} <<EOF
  788. #include "confdefs.h"
  789. #include <ctype.h>
  790. int main() { return 0; }
  791. int t() { 
  792. /* The GNU C library defines this for functions which it implements
  793.     to always fail with ENOSYS.  Some functions are actually named
  794.     something starting with __ and the normal name is an alias.  */
  795. #if defined (__stub_wait3) || defined (__stub___wait3)
  796. choke me
  797. #else
  798. /* Override any gcc2 internal prototype to avoid an error.  */
  799. extern char wait3(); wait3();
  800. #endif
  801. ; return 0; }
  802. EOF
  803. if eval $ac_compile; then
  804.   :
  805. else
  806.   rm -rf conftest*
  807.   {
  808. test -n "$verbose" && \
  809. echo "    defining NO_WAIT3"
  810. echo "#define" NO_WAIT3 "1" >> confdefs.h
  811. DEFS="$DEFS -DNO_WAIT3=1"
  812. }
  813.  
  814. fi
  815. rm -f conftest*
  816.  
  817.  
  818. #--------------------------------------------------------------------
  819. #    Supply substitutes for missing POSIX header files.  Special
  820. #    notes:
  821. #        - Sprite's dirent.h exists but is bogus.
  822. #        - stdlib.h doesn't define strtol, strtoul, or
  823. #          strtod insome versions of SunOS
  824. #        - some versions of string.h don't declare procedures such
  825. #          as strstr
  826. #--------------------------------------------------------------------
  827.  
  828. test -n "$silent" || echo "checking for unistd.h"
  829. test -n "$silent" || echo "checking how to run the C preprocessor"
  830. if test -z "$CPP"; then
  831.   # This must be in double quotes, not single quotes, because CPP may get
  832.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  833.   # make.  It must be expanded now.
  834.   CPP="${CC-cc} -E"
  835.   cat > conftest.${ac_ext} <<EOF
  836. #include "confdefs.h"
  837. #include <stdio.h>
  838. Syntax Error
  839. EOF
  840. # Some shells (Coherent) do redirections in the wrong order, so need
  841. # the parens.
  842. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  843. if test -z "$ac_err"; then
  844.   :
  845. else
  846.   rm -rf conftest*
  847.   CPP="${CC-cc} -E -traditional-cpp"
  848.   cat > conftest.${ac_ext} <<EOF
  849. #include "confdefs.h"
  850. #include <stdio.h>
  851. Syntax Error
  852. EOF
  853. # Some shells (Coherent) do redirections in the wrong order, so need
  854. # the parens.
  855. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  856. if test -z "$ac_err"; then
  857.   :
  858. else
  859.   rm -rf conftest*
  860.   CPP=/lib/cpp
  861. fi
  862. rm -f conftest*
  863. fi
  864. rm -f conftest*
  865. fi
  866. test -n "$verbose" && echo "    setting CPP to $CPP"
  867.  
  868. cat > conftest.${ac_ext} <<EOF
  869. #include "confdefs.h"
  870. #include <unistd.h>
  871. EOF
  872. # Some shells (Coherent) do redirections in the wrong order, so need
  873. # the parens.
  874. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  875. if test -z "$ac_err"; then
  876.   :
  877. else
  878.   rm -rf conftest*
  879.   
  880. {
  881. test -n "$verbose" && \
  882. echo "    defining NO_UNISTD_H"
  883. echo "#define" NO_UNISTD_H "1" >> confdefs.h
  884. DEFS="$DEFS -DNO_UNISTD_H=1"
  885. }
  886.  
  887. fi
  888. rm -f conftest*
  889.  
  890. test -n "$silent" || echo "checking for dirent.h"
  891. cat > conftest.${ac_ext} <<EOF
  892. #include "confdefs.h"
  893. #include <sys/types.h>
  894. #include <dirent.h>
  895. int main() { return 0; }
  896. int t() { 
  897. DIR *d;
  898. struct dirent *entryPtr;
  899. char *p;
  900. d = opendir("foobar");
  901. entryPtr = readdir(d);
  902. p = entryPtr->d_name;
  903. closedir(d);
  904. ; return 0; }
  905. EOF
  906. if eval $ac_compile; then
  907.   rm -rf conftest*
  908.   tcl_ok=1
  909.  
  910. else
  911.   rm -rf conftest*
  912.   tcl_ok=0
  913. fi
  914. rm -f conftest*
  915.  
  916. echo '#include "confdefs.h"
  917. #include <dirent.h>' > conftest.${ac_ext}
  918. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  919. if egrep "Sprite version.* NOT POSIX" conftest.out >/dev/null 2>&1; then
  920.   rm -rf conftest*
  921.   tcl_ok=0
  922.  
  923. fi
  924. rm -f conftest*
  925.  
  926. if test $tcl_ok = 0; then
  927.     
  928. {
  929. test -n "$verbose" && \
  930. echo "    defining NO_DIRENT_H"
  931. echo "#define" NO_DIRENT_H "1" >> confdefs.h
  932. DEFS="$DEFS -DNO_DIRENT_H=1"
  933. }
  934.  
  935. fi
  936. test -n "$silent" || echo "checking for errno.h"
  937. cat > conftest.${ac_ext} <<EOF
  938. #include "confdefs.h"
  939. #include <errno.h>
  940. EOF
  941. # Some shells (Coherent) do redirections in the wrong order, so need
  942. # the parens.
  943. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  944. if test -z "$ac_err"; then
  945.   :
  946. else
  947.   rm -rf conftest*
  948.   
  949. {
  950. test -n "$verbose" && \
  951. echo "    defining NO_ERRNO_H"
  952. echo "#define" NO_ERRNO_H "1" >> confdefs.h
  953. DEFS="$DEFS -DNO_ERRNO_H=1"
  954. }
  955.  
  956. fi
  957. rm -f conftest*
  958.  
  959. test -n "$silent" || echo "checking for float.h"
  960. cat > conftest.${ac_ext} <<EOF
  961. #include "confdefs.h"
  962. #include <float.h>
  963. EOF
  964. # Some shells (Coherent) do redirections in the wrong order, so need
  965. # the parens.
  966. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  967. if test -z "$ac_err"; then
  968.   :
  969. else
  970.   rm -rf conftest*
  971.   
  972. {
  973. test -n "$verbose" && \
  974. echo "    defining NO_FLOAT_H"
  975. echo "#define" NO_FLOAT_H "1" >> confdefs.h
  976. DEFS="$DEFS -DNO_FLOAT_H=1"
  977. }
  978.  
  979. fi
  980. rm -f conftest*
  981.  
  982. test -n "$silent" || echo "checking for limits.h"
  983. cat > conftest.${ac_ext} <<EOF
  984. #include "confdefs.h"
  985. #include <limits.h>
  986. EOF
  987. # Some shells (Coherent) do redirections in the wrong order, so need
  988. # the parens.
  989. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  990. if test -z "$ac_err"; then
  991.   :
  992. else
  993.   rm -rf conftest*
  994.   
  995. {
  996. test -n "$verbose" && \
  997. echo "    defining NO_LIMITS_H"
  998. echo "#define" NO_LIMITS_H "1" >> confdefs.h
  999. DEFS="$DEFS -DNO_LIMITS_H=1"
  1000. }
  1001.  
  1002. fi
  1003. rm -f conftest*
  1004.  
  1005. test -n "$silent" || echo "checking for bstring.h"
  1006. cat > conftest.${ac_ext} <<EOF
  1007. #include "confdefs.h"
  1008. #include <bstring.h>
  1009. EOF
  1010. # Some shells (Coherent) do redirections in the wrong order, so need
  1011. # the parens.
  1012. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1013. if test -z "$ac_err"; then
  1014.   :
  1015. else
  1016.   rm -rf conftest*
  1017.   
  1018. {
  1019. test -n "$verbose" && \
  1020. echo "    defining NO_BSTRING_H"
  1021. echo "#define" NO_BSTRING_H "1" >> confdefs.h
  1022. DEFS="$DEFS -DNO_BSTRING_H=1"
  1023. }
  1024.  
  1025. fi
  1026. rm -f conftest*
  1027.  
  1028. test -n "$silent" || echo "checking for stdlib.h"
  1029. cat > conftest.${ac_ext} <<EOF
  1030. #include "confdefs.h"
  1031. #include <stdlib.h>
  1032. EOF
  1033. # Some shells (Coherent) do redirections in the wrong order, so need
  1034. # the parens.
  1035. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1036. if test -z "$ac_err"; then
  1037.   rm -rf conftest*
  1038.   tcl_ok=1
  1039.  
  1040. else
  1041.   rm -rf conftest*
  1042.   tcl_ok=0
  1043. fi
  1044. rm -f conftest*
  1045.  
  1046. echo '#include "confdefs.h"
  1047. #include <stdlib.h>' > conftest.${ac_ext}
  1048. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1049. if egrep "getenv" conftest.out >/dev/null 2>&1; then
  1050.   :
  1051. else
  1052.   rm -rf conftest*
  1053.   tcl_ok=0
  1054. fi
  1055. rm -f conftest*
  1056.  
  1057. echo '#include "confdefs.h"
  1058. #include <stdlib.h>' > conftest.${ac_ext}
  1059. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1060. if egrep "strtol" conftest.out >/dev/null 2>&1; then
  1061.   :
  1062. else
  1063.   rm -rf conftest*
  1064.   tcl_ok=0
  1065. fi
  1066. rm -f conftest*
  1067.  
  1068. echo '#include "confdefs.h"
  1069. #include <stdlib.h>' > conftest.${ac_ext}
  1070. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1071. if egrep "strtoul" conftest.out >/dev/null 2>&1; then
  1072.   :
  1073. else
  1074.   rm -rf conftest*
  1075.   tcl_ok=0
  1076. fi
  1077. rm -f conftest*
  1078.  
  1079. echo '#include "confdefs.h"
  1080. #include <stdlib.h>' > conftest.${ac_ext}
  1081. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1082. if egrep "strtod" conftest.out >/dev/null 2>&1; then
  1083.   :
  1084. else
  1085.   rm -rf conftest*
  1086.   tcl_ok=0
  1087. fi
  1088. rm -f conftest*
  1089.  
  1090. if test $tcl_ok = 0; then
  1091.     
  1092. {
  1093. test -n "$verbose" && \
  1094. echo "    defining NO_STDLIB_H"
  1095. echo "#define" NO_STDLIB_H "1" >> confdefs.h
  1096. DEFS="$DEFS -DNO_STDLIB_H=1"
  1097. }
  1098.  
  1099. fi
  1100. test -n "$silent" || echo "checking for string.h"
  1101. cat > conftest.${ac_ext} <<EOF
  1102. #include "confdefs.h"
  1103. #include <string.h>
  1104. EOF
  1105. # Some shells (Coherent) do redirections in the wrong order, so need
  1106. # the parens.
  1107. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1108. if test -z "$ac_err"; then
  1109.   rm -rf conftest*
  1110.   tcl_ok=1
  1111.  
  1112. else
  1113.   rm -rf conftest*
  1114.   tcl_ok=0
  1115. fi
  1116. rm -f conftest*
  1117.  
  1118. echo '#include "confdefs.h"
  1119. #include <string.h>' > conftest.${ac_ext}
  1120. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1121. if egrep "strstr" conftest.out >/dev/null 2>&1; then
  1122.   :
  1123. else
  1124.   rm -rf conftest*
  1125.   tcl_ok=0
  1126. fi
  1127. rm -f conftest*
  1128.  
  1129. echo '#include "confdefs.h"
  1130. #include <string.h>' > conftest.${ac_ext}
  1131. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1132. if egrep "strerror" conftest.out >/dev/null 2>&1; then
  1133.   :
  1134. else
  1135.   rm -rf conftest*
  1136.   tcl_ok=0
  1137. fi
  1138. rm -f conftest*
  1139.  
  1140. if test $tcl_ok = 0; then
  1141.     
  1142. {
  1143. test -n "$verbose" && \
  1144. echo "    defining NO_STRING_H"
  1145. echo "#define" NO_STRING_H "1" >> confdefs.h
  1146. DEFS="$DEFS -DNO_STRING_H=1"
  1147. }
  1148.  
  1149. fi
  1150. test -n "$silent" || echo "checking for sys/time.h"
  1151. cat > conftest.${ac_ext} <<EOF
  1152. #include "confdefs.h"
  1153. #include <sys/time.h>
  1154. EOF
  1155. # Some shells (Coherent) do redirections in the wrong order, so need
  1156. # the parens.
  1157. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1158. if test -z "$ac_err"; then
  1159.   :
  1160. else
  1161.   rm -rf conftest*
  1162.   
  1163. {
  1164. test -n "$verbose" && \
  1165. echo "    defining NO_SYS_TIME_H"
  1166. echo "#define" NO_SYS_TIME_H "1" >> confdefs.h
  1167. DEFS="$DEFS -DNO_SYS_TIME_H=1"
  1168. }
  1169.  
  1170. fi
  1171. rm -f conftest*
  1172.  
  1173. test -n "$silent" || echo "checking for sys/wait.h"
  1174. cat > conftest.${ac_ext} <<EOF
  1175. #include "confdefs.h"
  1176. #include <sys/wait.h>
  1177. EOF
  1178. # Some shells (Coherent) do redirections in the wrong order, so need
  1179. # the parens.
  1180. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1181. if test -z "$ac_err"; then
  1182.   :
  1183. else
  1184.   rm -rf conftest*
  1185.   
  1186. {
  1187. test -n "$verbose" && \
  1188. echo "    defining NO_SYS_WAIT_H"
  1189. echo "#define" NO_SYS_WAIT_H "1" >> confdefs.h
  1190. DEFS="$DEFS -DNO_SYS_WAIT_H=1"
  1191. }
  1192.  
  1193. fi
  1194. rm -f conftest*
  1195.  
  1196.  
  1197. #--------------------------------------------------------------------
  1198. #    Include sys/select.h if it exists and if it supplies things
  1199. #    that appear to be useful and aren't already in sys/types.h.
  1200. #    This appears to be true only on the RS/6000 under AIX.  Some
  1201. #    systems like OSF/1 have a sys/select.h that's of no use, and
  1202. #    other systems like SCO UNIX have a sys/select.h that's
  1203. #    pernicious.  If "fd_set" isn't defined anywhere then set a
  1204. #    special flag.
  1205. #--------------------------------------------------------------------
  1206.  
  1207. echo checking for sys/select.h
  1208. test -n "$silent" || echo "checking for fd_set"
  1209. cat > conftest.${ac_ext} <<EOF
  1210. #include "confdefs.h"
  1211. #include <sys/types.h>
  1212. int main() { return 0; }
  1213. int t() { fd_set readMask, writeMask;; return 0; }
  1214. EOF
  1215. if eval $ac_compile; then
  1216.   :
  1217. else
  1218.   rm -rf conftest*
  1219.   echo '#include "confdefs.h"
  1220. #include <sys/select.h>' > conftest.${ac_ext}
  1221. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1222. if egrep "fd_mask" conftest.out >/dev/null 2>&1; then
  1223.   rm -rf conftest*
  1224.   
  1225. {
  1226. test -n "$verbose" && \
  1227. echo "    defining HAVE_SYS_SELECT_H"
  1228. echo "#define" HAVE_SYS_SELECT_H "1" >> confdefs.h
  1229. DEFS="$DEFS -DHAVE_SYS_SELECT_H=1"
  1230. }
  1231.  
  1232.  
  1233. else
  1234.   rm -rf conftest*
  1235.   
  1236. {
  1237. test -n "$verbose" && \
  1238. echo "    defining NO_FD_SET"
  1239. echo "#define" NO_FD_SET "1" >> confdefs.h
  1240. DEFS="$DEFS -DNO_FD_SET=1"
  1241. }
  1242.  
  1243. fi
  1244. rm -f conftest*
  1245.  
  1246. fi
  1247. rm -f conftest*
  1248.  
  1249.  
  1250. # On the HP, select is defined in sys/time.h
  1251. #
  1252. echo '#include "confdefs.h"
  1253. #include <sys/time.h>' > conftest.${ac_ext}
  1254. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1255. if egrep "select" conftest.out >/dev/null 2>&1; then
  1256.   rm -rf conftest*
  1257.   
  1258. {
  1259. test -n "$verbose" && \
  1260. echo "    defining SELECT_IN_TIME_H"
  1261. echo "#define" SELECT_IN_TIME_H "1" >> confdefs.h
  1262. DEFS="$DEFS -DSELECT_IN_TIME_H=1"
  1263. }
  1264.  
  1265.  
  1266. fi
  1267. rm -f conftest*
  1268.  
  1269.  
  1270.  
  1271. #--------------------------------------------------------------------
  1272. #    On some systems strstr is broken: it returns a pointer even
  1273. #    even if the original string is empty.
  1274. #--------------------------------------------------------------------
  1275.  
  1276. cat > conftest.${ac_ext} <<EOF
  1277. #include "confdefs.h"
  1278.  
  1279. extern int strstr();
  1280. int main()
  1281. {
  1282.     exit(strstr("\0test", "test") ? 1 : 0);
  1283. }
  1284.  
  1285. EOF
  1286. eval $ac_compile
  1287. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1288.   :
  1289. else
  1290.   LIBOBJS="${LIBOBJS-} strstr.o"
  1291. fi
  1292. rm -fr conftest*
  1293.  
  1294. #--------------------------------------------------------------------
  1295. #    Check for strtoul function.  This is tricky because under some
  1296. #    versions of AIX strtoul returns an incorrect terminator
  1297. #    pointer for the string "0".
  1298. #--------------------------------------------------------------------
  1299.  
  1300. test -n "$silent" || echo "checking for strtoul"
  1301. cat > conftest.${ac_ext} <<EOF
  1302. #include "confdefs.h"
  1303. #include <ctype.h>
  1304. int main() { return 0; }
  1305. int t() { 
  1306. /* The GNU C library defines this for functions which it implements
  1307.     to always fail with ENOSYS.  Some functions are actually named
  1308.     something starting with __ and the normal name is an alias.  */
  1309. #if defined (__stub_strtoul) || defined (__stub___strtoul)
  1310. choke me
  1311. #else
  1312. /* Override any gcc2 internal prototype to avoid an error.  */
  1313. extern char strtoul(); strtoul();
  1314. #endif
  1315. ; return 0; }
  1316. EOF
  1317. if eval $ac_compile; then
  1318.   rm -rf conftest*
  1319.   tcl_ok=1
  1320.  
  1321. else
  1322.   rm -rf conftest*
  1323.   tcl_ok=0
  1324. fi
  1325. rm -f conftest*
  1326.  
  1327. cat > conftest.${ac_ext} <<EOF
  1328. #include "confdefs.h"
  1329.  
  1330. extern int strtoul();
  1331. int main()
  1332. {
  1333.     char *string = "0";
  1334.     char *term;
  1335.     int value;
  1336.     value = strtoul(string, &term, 0);
  1337.     if ((value != 0) || (term != (string+1))) {
  1338.         exit(1);
  1339.     }
  1340.     exit(0);
  1341. }
  1342. EOF
  1343. eval $ac_compile
  1344. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1345.   :
  1346. else
  1347.   tcl_ok=0
  1348. fi
  1349. rm -fr conftest*
  1350. if test $tcl_ok = 0; then
  1351.     LIBOBJS="${LIBOBJS-} strtoul.o"
  1352. fi
  1353.  
  1354. #--------------------------------------------------------------------
  1355. #    Check for the strtod function.  This is tricky because under
  1356. #    some versions of Linux it mis-parses the string "+".
  1357. #--------------------------------------------------------------------
  1358.  
  1359. test -n "$silent" || echo "checking for strtod"
  1360. cat > conftest.${ac_ext} <<EOF
  1361. #include "confdefs.h"
  1362. #include <ctype.h>
  1363. int main() { return 0; }
  1364. int t() { 
  1365. /* The GNU C library defines this for functions which it implements
  1366.     to always fail with ENOSYS.  Some functions are actually named
  1367.     something starting with __ and the normal name is an alias.  */
  1368. #if defined (__stub_strtod) || defined (__stub___strtod)
  1369. choke me
  1370. #else
  1371. /* Override any gcc2 internal prototype to avoid an error.  */
  1372. extern char strtod(); strtod();
  1373. #endif
  1374. ; return 0; }
  1375. EOF
  1376. if eval $ac_compile; then
  1377.   rm -rf conftest*
  1378.   tcl_ok=1
  1379.  
  1380. else
  1381.   rm -rf conftest*
  1382.   tcl_ok=0
  1383. fi
  1384. rm -f conftest*
  1385.  
  1386. cat > conftest.${ac_ext} <<EOF
  1387. #include "confdefs.h"
  1388.  
  1389. extern double strtod();
  1390. int main()
  1391. {
  1392.     char *string = "+";
  1393.     char *term;
  1394.     double value;
  1395.     value = strtod(string, &term);
  1396.     if (term != string) {
  1397.     exit(1);
  1398.     }
  1399.     exit(0);
  1400. }
  1401. EOF
  1402. eval $ac_compile
  1403. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1404.   :
  1405. else
  1406.   tcl_ok=0
  1407. fi
  1408. rm -fr conftest*
  1409. if test $tcl_ok = 0; then
  1410.     LIBOBJS="${LIBOBJS-} strtod.o"
  1411. fi
  1412.  
  1413. #--------------------------------------------------------------------
  1414. #    Check for various typedefs and provide substitutes if
  1415. #    they don't exist.
  1416. #--------------------------------------------------------------------
  1417.  
  1418. test -n "$silent" || echo "checking for mode_t in sys/types.h"
  1419. echo '#include "confdefs.h"
  1420. #include <sys/types.h>' > conftest.${ac_ext}
  1421. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1422. if egrep "mode_t" conftest.out >/dev/null 2>&1; then
  1423.   :
  1424. else
  1425.   rm -rf conftest*
  1426.   
  1427. {
  1428. test -n "$verbose" && \
  1429. echo "    defining" mode_t to be "int"
  1430. echo "#define" mode_t "int" >> confdefs.h
  1431. DEFS="$DEFS -Dmode_t=int"
  1432. }
  1433.  
  1434. fi
  1435. rm -f conftest*
  1436.  
  1437. test -n "$silent" || echo "checking for pid_t in sys/types.h"
  1438. echo '#include "confdefs.h"
  1439. #include <sys/types.h>' > conftest.${ac_ext}
  1440. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1441. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  1442.   :
  1443. else
  1444.   rm -rf conftest*
  1445.   
  1446. {
  1447. test -n "$verbose" && \
  1448. echo "    defining" pid_t to be "int"
  1449. echo "#define" pid_t "int" >> confdefs.h
  1450. DEFS="$DEFS -Dpid_t=int"
  1451. }
  1452.  
  1453. fi
  1454. rm -f conftest*
  1455.  
  1456. test -n "$silent" || echo "checking for size_t in sys/types.h"
  1457. echo '#include "confdefs.h"
  1458. #include <sys/types.h>' > conftest.${ac_ext}
  1459. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1460. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  1461.   :
  1462. else
  1463.   rm -rf conftest*
  1464.   
  1465. {
  1466. test -n "$verbose" && \
  1467. echo "    defining" size_t to be "unsigned"
  1468. echo "#define" size_t "unsigned" >> confdefs.h
  1469. DEFS="$DEFS -Dsize_t=unsigned"
  1470. }
  1471.  
  1472. fi
  1473. rm -f conftest*
  1474.  
  1475. test -n "$silent" || echo "checking for uid_t in sys/types.h"
  1476. echo '#include "confdefs.h"
  1477. #include <sys/types.h>' > conftest.${ac_ext}
  1478. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1479. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  1480.   :
  1481. else
  1482.   rm -rf conftest*
  1483.   
  1484. {
  1485. test -n "$verbose" && \
  1486. echo "    defining" uid_t to be "int"
  1487. echo "#define" uid_t "int" >> confdefs.h
  1488. DEFS="$DEFS -Duid_t=int"
  1489. }
  1490.  
  1491. {
  1492. test -n "$verbose" && \
  1493. echo "    defining" gid_t to be "int"
  1494. echo "#define" gid_t "int" >> confdefs.h
  1495. DEFS="$DEFS -Dgid_t=int"
  1496. }
  1497.  
  1498. fi
  1499. rm -f conftest*
  1500.  
  1501.  
  1502. #--------------------------------------------------------------------
  1503. #    If a system doesn't have an opendir function (man, that's old!)
  1504. #    then we have to supply a different version of dirent.h which
  1505. #    is compatible with the substitute version of opendir that's
  1506. #    provided.  This version only works with V7-style directories.
  1507. #--------------------------------------------------------------------
  1508.  
  1509. test -n "$silent" || echo "checking for opendir"
  1510. cat > conftest.${ac_ext} <<EOF
  1511. #include "confdefs.h"
  1512. #include <ctype.h>
  1513. int main() { return 0; }
  1514. int t() { 
  1515. /* The GNU C library defines this for functions which it implements
  1516.     to always fail with ENOSYS.  Some functions are actually named
  1517.     something starting with __ and the normal name is an alias.  */
  1518. #if defined (__stub_opendir) || defined (__stub___opendir)
  1519. choke me
  1520. #else
  1521. /* Override any gcc2 internal prototype to avoid an error.  */
  1522. extern char opendir(); opendir();
  1523. #endif
  1524. ; return 0; }
  1525. EOF
  1526. if eval $ac_compile; then
  1527.   :
  1528. else
  1529.   rm -rf conftest*
  1530.   {
  1531. test -n "$verbose" && \
  1532. echo "    defining USE_DIRENT2_H"
  1533. echo "#define" USE_DIRENT2_H "1" >> confdefs.h
  1534. DEFS="$DEFS -DUSE_DIRENT2_H=1"
  1535. }
  1536.  
  1537. fi
  1538. rm -f conftest*
  1539.  
  1540.  
  1541. #--------------------------------------------------------------------
  1542. #    Check for the existence of sys_errlist (this is only needed if
  1543. #    there's no strerror, but I don't know how to conditionalize the
  1544. #    check).
  1545. #--------------------------------------------------------------------
  1546.  
  1547. test -n "$silent" || echo "checking for sys_errlist"
  1548. cat > conftest.${ac_ext} <<EOF
  1549. #include "confdefs.h"
  1550.  
  1551. int main() { return 0; }
  1552. int t() { 
  1553. extern char *sys_errlist[];
  1554. extern int sys_nerr;
  1555. sys_errlist[sys_nerr-1][0] = 0;
  1556. ; return 0; }
  1557. EOF
  1558. if eval $ac_compile; then
  1559.   :
  1560. else
  1561.   rm -rf conftest*
  1562.   
  1563. {
  1564. test -n "$verbose" && \
  1565. echo "    defining NO_SYS_ERRLIST"
  1566. echo "#define" NO_SYS_ERRLIST "1" >> confdefs.h
  1567. DEFS="$DEFS -DNO_SYS_ERRLIST=1"
  1568. }
  1569.  
  1570. fi
  1571. rm -f conftest*
  1572.  
  1573.  
  1574. #--------------------------------------------------------------------
  1575. #    The check below checks whether <sys/wait.h> defines the type
  1576. #    "union wait" correctly.  It's needed because of weirdness in
  1577. #    HP-UX where "union wait" is defined in both the BSD and SYS-V
  1578. #    environments.  Checking the usability of WIFEXITED seems to do
  1579. #    the trick.
  1580. #--------------------------------------------------------------------
  1581.  
  1582. test -n "$silent" || echo "checking for union wait"
  1583. cat > conftest.${ac_ext} <<EOF
  1584. #include "confdefs.h"
  1585. #include <sys/types.h> 
  1586. #include <sys/wait.h>
  1587. int main() { return 0; }
  1588. int t() { 
  1589. union wait x;
  1590. WIFEXITED(x);        /* Generates compiler error if WIFEXITED
  1591.              * uses an int. */
  1592. ; return 0; }
  1593. EOF
  1594. if eval $ac_compile; then
  1595.   :
  1596. else
  1597.   rm -rf conftest*
  1598.   
  1599. {
  1600. test -n "$verbose" && \
  1601. echo "    defining NO_UNION_WAIT"
  1602. echo "#define" NO_UNION_WAIT "1" >> confdefs.h
  1603. DEFS="$DEFS -DNO_UNION_WAIT=1"
  1604. }
  1605.  
  1606. fi
  1607. rm -f conftest*
  1608.  
  1609.  
  1610. #--------------------------------------------------------------------
  1611. #    Check to see whether the system supports the matherr function
  1612. #    and its associated type "struct exception".
  1613. #--------------------------------------------------------------------
  1614.  
  1615. test -n "$silent" || echo "checking for matherr support"
  1616. cat > conftest.${ac_ext} <<EOF
  1617. #include "confdefs.h"
  1618. #include <math.h>
  1619. int main() { return 0; }
  1620. int t() { 
  1621. struct exception x;
  1622. x.type = DOMAIN;
  1623. x.type = SING;
  1624. ; return 0; }
  1625. EOF
  1626. if eval $ac_compile; then
  1627.   rm -rf conftest*
  1628.   LIBOBJS="${LIBOBJS-} matherr.o"; 
  1629. {
  1630. test -n "$verbose" && \
  1631. echo "    defining NEED_MATHERR"
  1632. echo "#define" NEED_MATHERR "1" >> confdefs.h
  1633. DEFS="$DEFS -DNEED_MATHERR=1"
  1634. }
  1635.  
  1636.  
  1637. fi
  1638. rm -f conftest*
  1639.  
  1640.  
  1641. #--------------------------------------------------------------------
  1642. #    End of the section lifted from tcl.
  1643. #--------------------------------------------------------------------
  1644.  
  1645. #--------------------------------------------------------------------
  1646. #    Check for rint()
  1647. #--------------------------------------------------------------------
  1648.  
  1649. LIBS="${LIBS-} -lm"
  1650. for ac_func in rint
  1651. do
  1652. test -n "$silent" || echo "checking for ${ac_func}"
  1653. cat > conftest.${ac_ext} <<EOF
  1654. #include "confdefs.h"
  1655. #include <ctype.h>
  1656. int main() { return 0; }
  1657. int t() { 
  1658. /* The GNU C library defines this for functions which it implements
  1659.     to always fail with ENOSYS.  Some functions are actually named
  1660.     something starting with __ and the normal name is an alias.  */
  1661. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1662. choke me
  1663. #else
  1664. /* Override any gcc2 internal prototype to avoid an error.  */
  1665. extern char ${ac_func}(); ${ac_func}();
  1666. #endif
  1667. ; return 0; }
  1668. EOF
  1669. if eval $ac_compile; then
  1670.   :
  1671. else
  1672.   rm -rf conftest*
  1673.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  1674. test -n "$verbose" && echo "    using ${ac_func}.o instead"
  1675. fi
  1676. rm -f conftest*
  1677.  
  1678. done
  1679.  
  1680.  
  1681. #--------------------------------------------------------------------
  1682. #    Check to see whether we know how to read the number of bytes
  1683. #    in a stdio buffer.
  1684. #--------------------------------------------------------------------
  1685.  
  1686. test -n "$silent" || echo "checking for stdio support"
  1687. cat > conftest.${ac_ext} <<EOF
  1688. #include "confdefs.h"
  1689. #include <stdio.h>
  1690. int main() { return 0; }
  1691. int t() { 
  1692. FILE f;
  1693. (f._IO_read_ptr >= f._IO_read_end);
  1694. ; return 0; }
  1695. EOF
  1696. if eval $ac_compile; then
  1697.   rm -rf conftest*
  1698.   
  1699. {
  1700. test -n "$verbose" && \
  1701. echo "    defining USE_LINUX_FBUFEMPTYP"
  1702. echo "#define" USE_LINUX_FBUFEMPTYP "1" >> confdefs.h
  1703. DEFS="$DEFS -DUSE_LINUX_FBUFEMPTYP=1"
  1704. }
  1705.  
  1706.  
  1707. fi
  1708. rm -f conftest*
  1709.  
  1710.  
  1711. #--------------------------------------------------------------------
  1712. #    Check to see if fsync is available.
  1713. #--------------------------------------------------------------------
  1714.  
  1715. test -n "$silent" || echo "checking for fsync"
  1716. cat > conftest.${ac_ext} <<EOF
  1717. #include "confdefs.h"
  1718. #include <ctype.h>
  1719. int main() { return 0; }
  1720. int t() { 
  1721. /* The GNU C library defines this for functions which it implements
  1722.     to always fail with ENOSYS.  Some functions are actually named
  1723.     something starting with __ and the normal name is an alias.  */
  1724. #if defined (__stub_fsync) || defined (__stub___fsync)
  1725. choke me
  1726. #else
  1727. /* Override any gcc2 internal prototype to avoid an error.  */
  1728. extern char fsync(); fsync();
  1729. #endif
  1730. ; return 0; }
  1731. EOF
  1732. if eval $ac_compile; then
  1733.   :
  1734. else
  1735.   rm -rf conftest*
  1736.   {
  1737. test -n "$verbose" && \
  1738. echo "    defining NO_FSYNC"
  1739. echo "#define" NO_FSYNC "1" >> confdefs.h
  1740. DEFS="$DEFS -DNO_FSYNC=1"
  1741. }
  1742.  
  1743. fi
  1744. rm -f conftest*
  1745.  
  1746.  
  1747. #--------------------------------------------------------------------
  1748. #    Look for select() in various places.
  1749. #    Tk adds all of these libraries that are found.
  1750. #    Under Irix 5.2, all three are found, but none should be
  1751. #    used.  Go figure.  So I test to see when select() is
  1752. #    found and stop adding libraries at that point.
  1753. #--------------------------------------------------------------------
  1754.  
  1755. test -n "$silent" || echo "checking for select"
  1756. cat > conftest.${ac_ext} <<EOF
  1757. #include "confdefs.h"
  1758. #include <ctype.h>
  1759. int main() { return 0; }
  1760. int t() { 
  1761. /* The GNU C library defines this for functions which it implements
  1762.     to always fail with ENOSYS.  Some functions are actually named
  1763.     something starting with __ and the normal name is an alias.  */
  1764. #if defined (__stub_select) || defined (__stub___select)
  1765. choke me
  1766. #else
  1767. /* Override any gcc2 internal prototype to avoid an error.  */
  1768. extern char select(); select();
  1769. #endif
  1770. ; return 0; }
  1771. EOF
  1772. if eval $ac_compile; then
  1773.   rm -rf conftest*
  1774.   select=1
  1775.  
  1776. else
  1777.   rm -rf conftest*
  1778.   select=0
  1779. fi
  1780. rm -f conftest*
  1781.  
  1782. SAVE_LIBS="$LIBS"
  1783. for lib in Xbsd socket nsl; do
  1784.   if test $select = 0; then
  1785.     ac_save_LIBS="${LIBS}"
  1786. LIBS="${LIBS} -l$lib"
  1787. ac_have_lib=""
  1788. test -n "$silent" || echo "checking for -l$lib"
  1789. cat > conftest.${ac_ext} <<EOF
  1790. #include "confdefs.h"
  1791.  
  1792. int main() { return 0; }
  1793. int t() { main();; return 0; }
  1794. EOF
  1795. if eval $ac_compile; then
  1796.   rm -rf conftest*
  1797.   ac_have_lib="1"
  1798.  
  1799. fi
  1800. rm -f conftest*
  1801. LIBS="${ac_save_LIBS}"
  1802. if test -n "${ac_have_lib}"; then
  1803.    :; tryit=1
  1804. else
  1805.    :; tryit=0
  1806. fi
  1807.  
  1808.     if test $tryit = 1; then
  1809.       LIBS="$LIBS -l$lib"
  1810.       test -n "$silent" || echo "checking for select"
  1811. cat > conftest.${ac_ext} <<EOF
  1812. #include "confdefs.h"
  1813. #include <ctype.h>
  1814. int main() { return 0; }
  1815. int t() { 
  1816. /* The GNU C library defines this for functions which it implements
  1817.     to always fail with ENOSYS.  Some functions are actually named
  1818.     something starting with __ and the normal name is an alias.  */
  1819. #if defined (__stub_select) || defined (__stub___select)
  1820. choke me
  1821. #else
  1822. /* Override any gcc2 internal prototype to avoid an error.  */
  1823. extern char select(); select();
  1824. #endif
  1825. ; return 0; }
  1826. EOF
  1827. if eval $ac_compile; then
  1828.   rm -rf conftest*
  1829.   select=1
  1830.  
  1831. else
  1832.   rm -rf conftest*
  1833.   LIBS="$SAVE_LIBS"
  1834. fi
  1835. rm -f conftest*
  1836.  
  1837.     fi
  1838.   fi
  1839. done
  1840. if test $select = 0; then
  1841.   echo "I can't find a select() in any library I've looked in,"
  1842.   echo "and you won't be able to compile without it.  Sorry."
  1843. fi
  1844.  
  1845. #--------------------------------------------------------------------
  1846. #    Finally, output the Makefiles for each part of the
  1847. #    distribution.  As a side effect the necessary directories are
  1848. #    created, too. 
  1849. #
  1850. #    In the best of all possible worlds, you would only need to add
  1851. #    new files to this list as mindy expands, and create the
  1852. #    Makefile.in for each of them;  in this world, however, you'll
  1853. #    probably have to mess with the rest of the file, so be warned:
  1854. #    autoconf is a very brittle programming language.
  1855. #--------------------------------------------------------------------
  1856.  
  1857.  
  1858. # The preferred way to propogate these variables is regular @ substitutions.
  1859. if test -n "$prefix"; then
  1860.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1861. else
  1862.   prefix=/usr/local
  1863. fi
  1864. if test -n "$exec_prefix"; then
  1865.   ac_prsub="$ac_prsub
  1866. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1867. else
  1868.   exec_prefix='${prefix}' # Let make expand it.
  1869. fi
  1870.  
  1871. # Any assignment to VPATH causes Sun make to only execute
  1872. # the first set of double-colon rules, so remove it if not needed.
  1873. # If there is a colon in the path, we need to keep it.
  1874. if test "x$srcdir" = x.; then
  1875.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1876. fi
  1877.  
  1878. # Quote sed substitution magic chars in DEFS.
  1879. cat >conftest.def <<EOF
  1880. $DEFS
  1881. EOF
  1882. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1883. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1884. rm -f conftest.def
  1885. # Substitute for predefined variables.
  1886.  
  1887. trap 'rm -f config.status; exit 1' 1 2 15
  1888. echo creating config.status
  1889. rm -f config.status
  1890. cat > config.status <<EOF
  1891. #!/bin/sh
  1892. # Generated automatically by configure.
  1893. # Run this file to recreate the current configuration.
  1894. # This directory was configured as follows,
  1895. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1896. #
  1897. # $0 $configure_args
  1898.  
  1899. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1900. for ac_option
  1901. do
  1902.   case "\$ac_option" in
  1903.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1904.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1905.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1906.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1907.     echo "config.status generated by autoconf version 1.11"
  1908.     exit 0 ;;
  1909.   -help | --help | --hel | --he | --h)
  1910.     echo "\$ac_cs_usage"; exit 0 ;;
  1911.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1912.   esac
  1913. done
  1914.  
  1915. trap 'rm -f Makefile \
  1916.     comp/Makefile \
  1917.     interp/Makefile \
  1918.     compat/Makefile \
  1919.     etc/Makefile \
  1920.     libraries/Makefile \
  1921.     libraries/dylan/Makefile \
  1922.     libraries/streams/Makefile \
  1923.     libraries/print/Makefile \
  1924.     libraries/format/Makefile \
  1925.     libraries/coll-ext/Makefile \
  1926.     libraries/random/Makefile \
  1927.     libraries/string-ext/Makefile \
  1928.     demos/Makefile \
  1929.     demos/hello-world/Makefile \
  1930.     demos/cat/Makefile \
  1931.     demos/html2txt/Makefile \
  1932.     tests/Makefile \
  1933. ; exit 1' 1 2 15
  1934. INSTALL='$INSTALL'
  1935. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1936. INSTALL_DATA='$INSTALL_DATA'
  1937. CC='$CC'
  1938. LEX='$LEX'
  1939. LEXLIB='$LEXLIB'
  1940. YACC='$YACC'
  1941. RANLIB='$RANLIB'
  1942. CCOPTS='$CCOPTS'
  1943. LFLAGS='$LFLAGS'
  1944. LIBOBJS='$LIBOBJS'
  1945. CPP='$CPP'
  1946. LIBS='$LIBS'
  1947. srcdir='$srcdir'
  1948. top_srcdir='$top_srcdir'
  1949. prefix='$prefix'
  1950. exec_prefix='$exec_prefix'
  1951. DEFS='$DEFS'
  1952. ac_prsub='$ac_prsub'
  1953. ac_vpsub='$ac_vpsub'
  1954. extrasub='$extrasub'
  1955. EOF
  1956. cat >> config.status <<\EOF
  1957.  
  1958. ac_given_srcdir=$srcdir
  1959.  
  1960. CONFIG_FILES=${CONFIG_FILES-"Makefile \
  1961.     comp/Makefile \
  1962.     interp/Makefile \
  1963.     compat/Makefile \
  1964.     etc/Makefile \
  1965.     libraries/Makefile \
  1966.     libraries/dylan/Makefile \
  1967.     libraries/streams/Makefile \
  1968.     libraries/print/Makefile \
  1969.     libraries/format/Makefile \
  1970.     libraries/coll-ext/Makefile \
  1971.     libraries/random/Makefile \
  1972.     libraries/string-ext/Makefile \
  1973.     demos/Makefile \
  1974.     demos/hello-world/Makefile \
  1975.     demos/cat/Makefile \
  1976.     demos/html2txt/Makefile \
  1977.     tests/Makefile \
  1978. "}
  1979. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1980.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1981.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1982.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1983.     # The file is in a subdirectory.
  1984.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1985.     ac_dir_suffix="/$ac_dir"
  1986.   else
  1987.     ac_dir_suffix=
  1988.   fi
  1989.  
  1990.   # A "../" for each directory in $ac_dir_suffix.
  1991.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1992.   case "$ac_given_srcdir" in
  1993.   .)  srcdir=.
  1994.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  1995.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1996.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1997.   *) # Relative path.
  1998.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1999.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2000.   esac
  2001.  
  2002.   echo creating "$ac_file"
  2003.   rm -f "$ac_file"
  2004.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2005.   case "$ac_file" in
  2006.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  2007.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2008.   esac
  2009.   sed -e "
  2010. $ac_prsub
  2011. $ac_vpsub
  2012. $extrasub
  2013. s%@INSTALL@%$INSTALL%g
  2014. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2015. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2016. s%@CC@%$CC%g
  2017. s%@LEX@%$LEX%g
  2018. s%@LEXLIB@%$LEXLIB%g
  2019. s%@YACC@%$YACC%g
  2020. s%@RANLIB@%$RANLIB%g
  2021. s%@CCOPTS@%$CCOPTS%g
  2022. s%@LFLAGS@%$LFLAGS%g
  2023. s%@LIBOBJS@%$LIBOBJS%g
  2024. s%@CPP@%$CPP%g
  2025. s%@LIBS@%$LIBS%g
  2026. s%@srcdir@%$srcdir%g
  2027. s%@top_srcdir@%$top_srcdir%g
  2028. s%@prefix@%$prefix%g
  2029. s%@exec_prefix@%$exec_prefix%g
  2030. s%@DEFS@%$DEFS%
  2031. " $ac_given_srcdir/${ac_file}.in >> $ac_file
  2032. fi; done
  2033.  
  2034.  
  2035. exit 0
  2036. EOF
  2037. chmod +x config.status
  2038. # Some shells look in PATH for config.status without the "./".
  2039. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  2040.  
  2041.  
  2042.